﻿using Rbac.Domain.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Rbac.Domain.Interface
{
	public interface IPermissionRepository
	{
		/// <summary>
		/// 获取权限
		/// </summary>
		/// <returns></returns>
		List<Permission> GetPermissions(string pName);
		/// <summary>
		/// 权限添加
		/// </summary>
		/// <param name="entity"></param>
		/// <returns></returns>
		int Add(Permission entity);
		/// <summary>
		/// 权限修改
		/// </summary>
		/// <param name="entity"></param>
		/// <returns></returns>
		int Update(Permission entity);
		/// <summary>
		/// 权限删除
		/// </summary>
		/// <param name="idList"></param>
		/// <returns></returns>
		int Delete(int loginUserId,params int[] idList);
		bool HasPermission(int roleId,string controllerName,string actionName);
	}
}
